<?php 
include 'views/inc/header.php'; 
 if( Session::get( 'authenticated' ) ) : ?>
<style>
	
	body
	{
		background-position: <?php echo $this->infoSession->bg_position; ?> 55px;
		background-attachment: <?php echo $this->infoSession->bg_attachment; ?>;
		
		<?php if( $this->infoSession->bg_attachment == 'fixed' ): ?>
		background-repeat: repeat repeat; 
		<?php else: ?>
		background-repeat: no-repeat; 
		<?php endif; ?>
		
		background-color: <?php echo $this->infoSession->bg_color; ?>;
		
		<?php if( $this->infoSession->bg != '' ): ?>
		background-image: url(<?php echo URL_BASE.'public/backgrounds/'.$this->infoSession->bg; ?>);
		<?php endif; ?>
	}
	
	body a,
	body a:hover { color: <?php echo $this->infoSession->color_link; ?>; }
	
	.icons { background-color: <?php echo $this->infoSession->color_link; ?>;}
	
</style>
<?php endif;//<<<---------- * Session Active * -------->>>> ?>

</head>
<!-- Body -->
	<body>
		
		<!-- warpper_top_bar -->
		<div class="warpper_top_bar">
			<?php include 'views/inc/profile_summary_inc.php'; ?>
				<!-- inner_top_bar -->
				<header class="inner_top_bar">
					<!-- padding_class -->
					<div class="padding_class">
						<a href="<?php echo URL_BASE; ?>">
						<?php include 'views/inc/logo.php'; ?>
						</a>
					    <?php include 'views/inc/navigation.php'; ?>
			    </div><!-- padding_class -->
			</header><!-- inner_top_bar -->
		</div><!-- warpper_top_bar -->
	
	<!-- page -->
	<div class="page">
		<!-- layout -->
		<section class="layout session">
			<div class="popout"></div>
			<!-- padding_class -->
		    <div class="padding_class sessionClass">
		    	<div class="formSearchResp">
						   <form action="search/" class="formResponsive" method="get" id="search_engine" accept-charset="UTF-8">
							  <input id="btnItems" name="q" class="mention" type="text" placeholder="<?php echo $_SESSION['LANG']['search_word']; ?>" maxlength="100">	
						      </form>
					</div>
		    <!-- wrapper_grid -->
		     <div class="wrapper_grid floatLeft">
				   
				   <?php
				   $totalPag = count( $this->pagesGeneral );
				   
				   if( $totalPag != 0 ) :
				    ?>
				    <!-- Grid 1 -->
				   <div class="grid_1">
				   		<!-- container_grid -->
				   		<div class="container_grid">
				   		    <ul class="settingsList">
				   		    	<li>
				   		    		<a href="<?php echo URL_BASE.'api/'; ?>">API</a>
				   		    	</li>
				   		    	<?php foreach( $this->pagesGeneral as $key ) : ?>
				   		    	<li>
				   		    		<a href="<?php echo URL_BASE.$key['url'].'/'; ?>"><?php echo stripslashes( $key['title'] ); ?></a>
				   		    	</li>
				   		    	<?php endforeach; ?>
				   		    </ul>
				   		   		</div><!-- container_grid -->
				   </div><!-- Grid 1 -->
				   <?php endif; ?>
				   
				   <?php 
				   //<---- * advertising * --->
				  include 'views/inc/advertising.php';
				   ?>
				   
				   <?php
				   if( Session::get( 'authenticated' ) ) :
				   //<---- * who_follow * --->
				   include 'views/inc/who_to_follow.php';
				   
				   endif;
				   //<---- * trending * --->
				   include 'views/inc/trending.php'; 
				    ?>
				   
				    <!-- Grid 1 -->
				   <div class="grid_1">
				   		<!-- container_grid -->
				   		<div class="container_grid about_pages">
				   			<?php include 'views/inc/footer_session.php'; ?>
				   		</div><!-- container_grid -->
				   </div><!-- Grid 1 -->
				   
				   
			   </div><!-- wrapper_grid -->
			   
			   <!-- Grid 2 -->
			   <div class="grid_2 floatRight">
			   <h4 class="titleBar"><?php if( isset( $this->title ) ): echo stripslashes( $this->title ); endif; ?></h4>
			<div class="container_page">
				<div style="line-height: normal;">
					
					<strong>API</strong> for developers
					
					<h1 class="title_api">Get user data</h1>
					<em>Example</em>
					
					<div class="col-pre">
						<pre>$ curl <?php echo URL_BASE; ?>api/?user=<strong>USERNAME</strong></pre>
					</div>
					
					<em>Description</em>
					<div class="col-pre">
						<pre><strong>user</strong> return the data specify the <strong>USERNAME</strong> via <strong>GET</strong></pre>
					</div>
					
					<em>Data Return</em>
					
					<div class="col-pre">
						<pre>{
							"<strong>totalFollowers</strong>":"2",
							"<strong>totalFollowing</strong>":"24",
							"<strong>totalFavs</strong>":"11",
							"<strong>totalPost</strong>":"29",
							"<strong>id</strong>":"1",
							"<strong>username</strong>":"MiguelVasquez",
							"<strong>name</strong>":"Miguel Vasquez",
							"<strong>location</strong>":"Aragua",
							"<strong>country</strong>":"ve",
							"<strong>website</strong>":"https://twitter.com/MiguelVasquez08",
							"<strong>bio</strong>":"#WebDesign #Developer",
							"<strong>avatar</strong>":"<?php echo URL_BASE; ?>public/avatar/miguelvasquez_19zy00.png",
							"<strong>avatar_large</strong>":"<?php echo URL_BASE; ?>public/avatar/large_miguelvasquez_19zy00.png",
							"<strong>verified</strong>":"0",
							"<strong>cover_image</strong>":"<?php echo URL_BASE; ?>cover/cover_miguelvasquez_1j07gs.jpg",
							"<strong>cover_large</strong>":"<?php echo URL_BASE; ?>cover/large_cover_miguelvasquez_1j07gs.jpg"
							}</pre>
					</div>
				
				<h1 class="title_api">Get last <?php echo $this->totalPostDisplay; ?> posts from an user</h1>
				<em>Example</em>
					
					<div class="col-pre">
						<pre>$ curl <?php echo URL_BASE; ?>api/?user=<strong>USERNAME</strong>&amp;post=true</pre>
					</div>
					
					<em>Data Return</em>
					<div class="col-pre">
						<pre>{
							"<strong>posts</strong>":
							[{
								"<strong>id</strong>":"1",
								"<strong>token_id</strong>":"a8e015ec6de45c88ba0412bc9f6e2feb272b042e",
								"<strong>post_details</strong>": "Hello world",
								"<strong>photo</strong>": "<?php echo URL_BASE; ?>public/upload/3j8ivw84ibn.jpeg",
								"<strong>video_code</strong>": "W7NZILqGgdI",
								"<strong>video_title</strong>": "Key Player For Game 5",
								"<strong>video_site</strong>": "youtube",
								"<strong>video_url</strong>": "http://youtu.be/GNZBSZD16cY",
								"<strong>user</strong>": "1",
								"<strong>status</strong>": "1",
								"<strong>video_thumbnail</strong>": "http://img.youtube.com/vi/W7NZILqGgdI/1.jpg",
								"<strong>date</strong>": "2013-06-14 13:31:04",
								"<strong>status_general</strong>": "1",
								"<strong>url_soundcloud</strong>": "",
								"<strong>title_soundcloud</strong>": "",
								"<strong>thumbnail_song</strong>": "",
							},
							{
								"<strong>id</strong>":"1",
								"<strong>token_id</strong>":"24ef025e5dfc71217397662c47a8d3be981084fb",
								"<strong>post_details</strong>": "Hello world",
								"<strong>photo</strong>": "<?php echo URL_BASE; ?>public/upload/3j8ivw84ibn.jpeg",
								"<strong>video_code</strong>": "W7NZILqGgdI",
								"<strong>video_title</strong>": "Key Player For Game 5",
								"<strong>video_site</strong>": "youtube",
								"<strong>video_url</strong>": "http://youtu.be/GNZBSZD16cY",
								"<strong>user</strong>": "1",
								"<strong>status</strong>": "1",
								"<strong>video_thumbnail</strong>": "http://img.youtube.com/vi/W7NZILqGgdI/1.jpg",
								"<strong>date</strong>": "2013-06-14 13:31:04",
								"<strong>status_general</strong>": "1",
								"<strong>url_soundcloud</strong>": "",
								"<strong>title_soundcloud</strong>": "",
								"<strong>thumbnail_song</strong>": "",
							}
							]}</pre>
					</div>
					
				</div><!-- /End Div general -->
				
			</div>
			   	
			    </div><!-- Grid 2 -->
			   		
			 </div><!-- padding_class -->
		</section><!-- layout -->
	</div><!-- page -->
	
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery-1.7.1.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.easing.1.3.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery.placeholder.1.1.1.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>jquery-ui-1.8.17.custom.min.js"></script>
   <script src="<?php echo $_layoutParams['root_js']; ?>functions.js"></script>
   
   
   <?php if( !Session::get( 'authenticated' ) ) : ?>
   <script src="<?php echo $_layoutParams['root_js']; ?>login.sign.up.js"></script>
   <?php endif; ?>

	</body>
</html>
